<?php
/* @var $this InvoiceController */
/* @var $model Invoice */

setlocale(LC_ALL, "de_DE.UTF-8");

$this->breadcrumbs=array(
	'Rechnungen'
);
?>

<br>
<h1>Rechnungsverwaltung</h1>

<?php echo CHtml::button('Neue Rechnung', array('submit' => array('invoice/createInvoiceNew'))); ?>

<br>
<br>
<br>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'cssFile' => Yii::app()->getRequest()->getBaseUrl() . '/css/tableStyle.css',
	'id'=>'invoice-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'invoice_id',
		'customer_id',
		'status',
		'date',
        array (
            'class'=>'CButtonColumn',
            'template'=>'{view}{delete}',
            'buttons'=>array(
            	'view'=>array(
            		'imageUrl'=>Yii::app()->request->baseUrl.'/images/view.png',
            	),
            	'delete'=>array(
            		'imageUrl'=>Yii::app()->request->baseUrl.'/images/delete.png',
            	),
            ),
        ),
	),
)); ?>
